#define _CRT_SECURE_NO_WARNINGS

#include <cstdlib>
#include <cstdio>
#include <iostream>
#include <cstring>

using namespace std;

typedef struct TToken {
	string word;
	int type, len;
} Token;

typedef struct TSen {
	Token tokens[1000];
	int num;
} Sen;

Token typeChecking(Token x) {
	int len = x.len = x.word.length();
	switch (x.word[len-1]) {
		case 'a':
		case 'e':
		case 'i':
		case 'o':
		case 'u': {
			if (len == 1) {x.type = 0; break;}
			if (len == 5) {
				char vowel[6];
				vowel[5] = 0;
				for (int i=0; i<5; ++i) {
					switch (x.word[i]) {
						case 'a':
						case 'e':
						case 'i':
						case 'o':
						case 'u':
							vowel[i] = 'V';
							break;
						default:
							vowel[i] = 'C';
					}
				}
				char p1[]="CCVCV", p2[]="CVCCV";
				if (strcmp(p1, vowel)==0 || strcmp(p2, vowel)==0)
					x.type = 6;
				else
					x.type = 7;
				break;
			} //predicates
			if (len == 2) {
				switch (x.word[0]) {
					case 'g': x.type = 1; break;
					case 'b': x.type = 2; break;
					case 'd': x.type = 3; break;
					case 'l': x.type = 4; break;
					default: x.type = 7;
				}
				break;
			}
			else
				x.type = 7;
		}
		default: x.type = 5; break; //name
	}
	return x;
}

int splitPredstring(Sen x, int s) {
	if (s>=x.num) return -1;
	if (x.tokens[s].type == 6) {
		++s;
		while (x.tokens[s].type == 6 && s < x.num) ++s;
		return s;
	}
	return -1;
}

int splitPredname(Sen x, int s) {
	if (s>=x.num) return -1;
	if (x.tokens[s].type == 5) return s+1;
	if (x.tokens[s].type == 4) {
		int ns = splitPredstring(x, s+1);
		return ns;
	}
	return -1;
}

int splitVerbpred(Sen x, int s) {
	if (s>=x.num) return -1;
	if (x.tokens[s].type == 1)
		return splitPredstring(x, s+1);
	return -1;
}

bool isStatement(Sen x, int s) {
	if (s>=x.num) return false;
	int ns = splitPredname(x, s);
	if (ns == -1) return false;
	ns = splitVerbpred(x, ns);
	if (ns == -1) return false;
	if (ns == x.num) return true;
	ns = splitPredname(x, ns);
	if (ns == x.num) return true;
	else return false;
}

int splitPreds(Sen x, int s) {
	if (s>=x.num) return -1;
	int ns = splitPredstring(x, s);
	if (ns == x.num || ns == -1) return ns;
	if (x.tokens[ns].type == 0) ++ns;
	else return -1;
	return splitPreds(x, ns);
}

bool isPredclaim(Sen x, int s) {
	if (s>=x.num) return false;
	if (x.tokens[s].type == 3) {
		int ns = splitPreds(x, s+1);
		if (ns == x.num) return true;
		else return false;
	}
	else {
		int ns = splitPredname(x, s);
		if (ns == -1) return false;
		if (ns == x.num) return false;
		if (x.tokens[ns].type == 2)
			++ns;
		else
			return false;
		ns = splitPreds(x, ns);
		if (ns == x.num) return true;
		else return false;
	}
}

bool isSentence(Sen x) {
	for (int i=0; i<x.num; ++i)
		if (x.tokens[i].type == 7) return false;
	return (isStatement(x, 0) || isPredclaim(x, 0));
}

int main(void)
{
	Token tmpTok;
	bool nextSen;
	char tmpWord[100];
	int senC = 0;
	while (true) {
		Sen sentence;
		sentence.num = 0;
		nextSen = false;
		while (!nextSen) {
			tmpTok.word.clear();
			memset(tmpWord, 0, 100);
			scanf(" %s", tmpWord);
			if (tmpWord[0] == '#') exit(0);

			for (int i=0; i<strlen(tmpWord); ++i)
				if (tmpWord[i] == '.') {
					tmpWord[i] = 0;
					tmpTok.word = string(tmpWord);
					nextSen = true;
					break;
				}
			if (!nextSen)
				tmpTok.word = string(tmpWord);

			sentence.tokens[sentence.num++] = typeChecking(tmpTok);
		}

// 		for (int i=0; i<sentence.num; ++i)
// 			cout << sentence.tokens[i].word << ":" << sentence.tokens[i].type << " ";
// 		cout << endl;

		cout << (isSentence(sentence)?"Good":"Bad!") << endl;
	}

	return 0;
}
